<extend name="Base:base" />
<block name="title"><title>门票管理</title></block>
<block name="content">
<script type="text/javascript" src="__PUBLIC__/Js/add_check.js"></script>
<script type="text/javascript" src="__PUBLIC__/Js/WdatePicker.js"></script>

<link href = "__PUBLIC__/Css/WdatePicker.css" type = "text/css" rel = "stylesheet"/>
<link href = "__PUBLIC__/Css/datepicker.css" type = "text/css" rel="stylesheet" />
<link href = "__PUBLIC__/Css/add.css" type = "text/css" rel = "stylesheet"/>
<div id="contentReg" align="center">	
  	<div id='register' align='center'>
    <p style="margin-left:-200px; font-size:20px; color:#1d353f; font-weight:bold;">添加门票</p>
    <hr width="420px" />
   		<form action='__CONTROLLER__/add' method='post' id="form_addScenic" enctype="multipart/form-data"/>
    		<ul id='inputReg'>
				<li>门票名称：&nbsp;&nbsp;
					<input type="text" name="name" id="name" style="width:150px; height:20px;" onFocus="javascript:hilite(this)"; onBlur="javascript:delite(this)"; />
					<div id="tsdiv"><font id="name_ts"></font></div>
				</li>
    			<li>图&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;片：&nbsp;&nbsp;
					<input type="file" name="image" id="image" style="width:150px;height:20px;" onFocus="javascript:hilite(this)"; onBlur="javascript:delite(this)";>
					<div id="tsdiv"><font id="image_ts"></font></div>
				</li>
				<li>原&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价：&nbsp;&nbsp;
					<input type="text" name="original" id="original" style="width:150px;height:20px;" onFocus="javascript:hilite(this)"; onBlur="javascript:delite(this)";>
					<div id="tsdiv"><font id="original_ts"></font></div>
				</li>
                <li>现&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价：&nbsp;&nbsp;
					<input type="text" name="price" id="price" style="width:150px;height:20px;" onFocus="javascript:hilite(this)"; onBlur="javascript:delite(this)";>
					<div id="tsdiv"><font id="price_ts"></font></div>
				</li>
				<li>所属景区：&nbsp;&nbsp;
					<select name="scenic_id" id="scenic_id" class="selectpicker" style="width:150px; height:20px;">
						<foreach name="list" item="scenic">
							<option value="{$scenic['id']}">{$scenic['name']}</option>
						</foreach>
					</select>
					<div id="tsdiv"><font id="school_id_ts"></font></div>
				</li>
 				<li>到期时间：&nbsp;&nbsp;
				<input type="text" class="Wdate" name="deadline" id="deadline" onBlur="javascript:delite(this)"; onFocus="WdatePicker({dchanging: cDayFunc, Mchanging: cMonthFunc, ychanging: cYearFunc, dchanged: cDayFunc, Mchanged: cMonthFunc, ychanged: cYearFunc})"/>
				</li>
				<div id="tsdiv"><font id="deadline_ts"></font></div>
                <li><input type="button" value="添  加" id="btn" onclick="javascript:submitBtn()";></li>                                 
			</ul>
    	</form>
    </div>
</div>  


<script>
        function cDayFunc() {
                                cFunc('d');
                            }
        function cMonthFunc() {
                                cFunc('M');
                            }
       function cYearFunc() {
                                cFunc('y');
                            }
        function cFunc(who) {
                                var str, p, c = $dp.cal;
                                if (who == 'y') {
                                    str = '年份';
                                    p = 'y';
                                }
                                else if (who == 'M') {
                                    str = '月份';
                                    p = 'M';
                                }
                                else if (who == 'd') {
                                    str = '日期';
                                    p = 'd';
                                }
                                
                            }
</script>
</block>         